import 'dart:async';

/**
 * 1.main函数是dart入口
 * 2.dart当中打印信息使用print函数
 */

main(List<String> args) {
  // List<String> args -> 列表<String> - 泛型
  print("Hello World");

  final stopwatch = Stopwatch()..start();
  print(stopwatch.isRunning);
  Timer.periodic(Duration(seconds: 2), (timer) {
    print(" watch : ${stopwatch.isRunning}");
    print(stopwatch.elapsed.inSeconds);
  });

  Timer(Duration(seconds: 4), () {
    print("four seconds");
  });

  print("end");
}
